package cn.melonlib.cores.model.enums;

import lombok.Getter;

@Getter
public enum CachePolicy {
    CACHE_FIRST("cache-first","缓存优先"),CACHE_AND_NETWORK("cache-and-network","缓存和网络同时使用"),
    NETWORK_ONLY("network-only","始终最新数据，并保存到缓存"),CACHE_ONLY("cache-only","仅使用缓存，缓存没有数据则抛出错误"),
    NO_CACHE("no-cache","不使用缓存");
    private final String flag;
    private final String label;

    CachePolicy(String flag, String label) {
        this.flag = flag;
        this.label = label;
    }
}
